package com.zhanghe.mall.service.impl;

import com.zhanghe.mall.pojo.Staff;
import com.zhanghe.mall.pojo.repository.StaffRespository;
import com.zhanghe.mall.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * StaffServiceImpl
 *
 * @author Clevo
 * @date 2018/10/17
 */
@Service
@Transactional(rollbackFor = Throwable.class)
public class StaffServiceImpl implements StaffService {

    @Autowired
    private StaffRespository staffRespository;

    @Override
    public Staff findStaffByAccountUserName(String userName) {
        return staffRespository.findByAccount_Username(userName);
    }
}
